<h1>Using the "FUSE LIKE" module</h1><br><h2>Compiling and installing</h2><br>Go to the "src" directory of NFS-GANESHA distribution.<br><br><div style="margin-left: 40px;">&nbsp;./configure --with-fsal=FUSE<br>&nbsp;make<br>&nbsp;make install<br></div><br><br><h2>Exporting your FUSE-based file system</h2><ul><li>In your source code, replace&nbsp;#<span style="font-style: italic;">include &lt;fuse.h&gt; </span>with&nbsp;<span style="font-style: italic;">#include &lt;ganesha_fuse_wrap.h&gt;</span></li><li>For linking your program, replace&nbsp;-<span style="font-style: italic;">lfuse </span>with \texttt{-lganeshaNFS}<br></li></ul><br>That's done! You can now start your daemon and mount your filesystem (here is an example in NFSv3):<br><div style="margin-left: 40px;">&nbsp;./my_daemon<br>&nbsp;mount -o vers=3,udp localhost:/ /mnt<br></div><br><br><h2>Details about GANESHA FUSE-like binding</h2><br>Ganesha
FUSE-like interface provides most FUSE's "high-level" structures and
calls (struct fuse_file_info, struct fuse_operations, fuse_main(),
fuse_get_context(), ...)<br><br><br><h2>Filesystem mandatory features</h2><br>For being able to export your filesystem with NFS-GANESHA, the following features are mandatory:<br><ul><li>getattr must be implemented</li><li>Each entry in your filesystem must have a <span style="font-style: italic;">unic&nbsp;st_ino, st_dev </span>peer</li><li>You must set a correct value to the "st_mode" field of "struct stat" (type and access mode)</li><li>The "st_nlink" field of "struct stat" must not be null</li><li>Deprecated call "getdir" is not supported, replace it with "readdir"<br></li></ul><br><br><h2>Example</h2><br>FUSE-binding examples are provided in the GANESHA repository (directory src/example-fuse).<br><br>These
are the same as provided with FUSE distributions, except
that ganesha_fuse_wrap.h is included instead of fuse.h . <br><br>After compiling GANESHA with FUSE FSAL, you can simply run it the following way:<br><br><div style="margin-left: 40px;">&nbsp;./fusexmp<br></div>
